<% include ../common/header.ejs %>
</head>
<body>
    <% include ../common/nav.ejs %>
    <div class="container">
        <div class="row">
            <% include ../common/sidebar.ejs %>
            <div class="col-md-10">
                
                <ol class="breadcrumb">
                    <li><a href="#">主页</a></li>
                    <li><a href="#">栏目管理</a></li>
                    <li class="active">栏目编辑</li>
                </ol>
                
                <%if(success){%>
                <div class="alert alert-success" role="alert"><%=success%></div>
                <%}%>
                <%if(error){%>
                <div class="alert alert-danger" role="alert">...</div>
                <%}%>
                <form class="form-inline" method="post" action="/admin/category/edit">
                    <div class="form-group">
                        <label class="sr-only" for="exampleInputEmail3">栏目名</label>
                        <input name="cname" value="<%=category.cname%>" type="text" class="form-control" id="exampleInputEmail3" placeholder="栏目名">
                    </div>
                    
                    <div class="checkbox">
                        <label>
                        <input name="active" <%if(category.active==1){%>checked<%}%> type="checkbox" value="1"> 是否显示
                        </label>
                    </div>
                    <input type="hidden" name="cid" value="<%=category.cid %>">
                    <button type="submit" class="btn btn-success">保存</button>
                </form>

                
            </div>
        </div>
    </div>

<% include ../common/footer.ejs %>